﻿@using OPM.MultiResource
@model OPM.Models.ResetPassword

@{
    Layout = "~/Views/Shared/_LayoutPopup.cshtml";
}

@using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    <div class="service_search_header">

        <div class="service_title">@Multi.ResetPassword</div>
    </div>
    <div class="service_box_table">

        <table id="resetpassword_table" class="changepass-table">
            <tbody>
                <tr>
                    <td>@Multi.oldPass</td>
                    <td>: </td>
                    <td>
                        @Html.TextBoxFor(m => m.old_password)
                    </td>
                </tr>
                <tr>
                    <td>@Multi.newPass</td>
                    <td>: </td>
                    <td>
                        @Html.TextBoxFor(m => m.new_password)
                    </td>
                </tr>
                <tr>
                    <td>@Multi.confirmPass</td>
                    <td>: </td>
                    <td>
                        @Html.TextBoxFor(m => m.new_password)
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                    <td><div style="color:red;"> @TempData["NonSuccess"]</div></td>
                </tr>
            </tbody>
        </table>
        
    </div>
    
    <div class="dNone">
        <div id="inline_content">
            <div class="SaveSuccess">
                <div class="SaveSuccessTab1">แก้ไขข้อมูลแล้ว</div>
                <div class="SaveSuccessTab3" onclick="$.colorbox.close();">@Multi.finish</div>
            </div>
        </div>
    </div>
    
    <div class="BoxServiceBottom">
        <span class="BoxServiceActionPrev dBlock floatL" onclick="parent.$.colorbox.close();">@Multi.close</span>
        <div class="floatL NoteProfie">
            @Multi.ProfileDescription
        </div>
        <input class="BoxServiceActionNext floatR" type="submit" value="@Multi.edit" />
        <div class="clear"></div>
    </div>
}

<script>

    function savedataform() {
        $.colorbox({
            inline: true,
            width: "50%",
            href: "#inline_content",
            fastIframe: false,
            onClosed: function () {

            }
        });
    }

    if (s == "บันทึกข้อมูลสำเร็จ") {
        savedataform();
    }

</script>

